package dao

import (
	"readme/global"
	"readme/internal/model"
)

func GetUserByMobile(mobile string) model.User {
	var result model.User
	if err := global.DB.Where("mobile = ?", mobile).Find(&result).Error; err != nil {
		return model.User{}
	}
	return result
}
